package com.samsung.sds.ssa.jsca.editor;

import org.eclipse.jface.text.rules.IWordDetector;

/**
 * A JavaScript aware word detector.
 * JavaScript tokens are almost identical to Java so this
 * class is borrowed from org.eclipse.jdt.internal.ui.text.JavaWordDetector.
 */
public class JSWordDetector implements IWordDetector {

	public boolean isWordStart(char c) {
		return Character.isJavaIdentifierStart(c);
	}
	
	public boolean isWordPart(char c) {
		return Character.isJavaIdentifierPart(c);
	}
}
